<h1>
    {% if CanAddCourses %}
        <a class="AddButton button floatleft" href="{% course_url management app='course' command='edit' %}" title="Add a new Course">+</a>
    {% endif %}
    Courses
</h1>
<table>
    {% if Courses %}
    <tr><th class="heading">ID</th><th class="heading">Title</th><th class="heading">Subtitle</th><th class="heading">Shown Until</th><th class="heading">Accessible Until</th><th class="heading" colspan="100%">Options</th></tr>
    {% for Course, editable in Courses.items %}
        <tr>
            <th>{{Course.course_id|safe}}</th>
            <td>{{Course.course_title|safe}}</td>
            <td>{{Course.course_subtitle|safe}}</td>
            <td>{% if Course.show_until %}{{Course.show_until}}{% else %}Forever{% endif %}</td>
            <td>{% if Course.accessible_until %}{{Course.accessible_until}}{% else %}Forever{% endif %}</td>
            {% if editable %}
            <td class="management_option">
                <a class="button smallbutton" href="{% course_url management app='course' command='edit' arguments=Course.course_id%}">Edit</a>
            </td>
            {% endif %}
            <td class="management_option"><a class="button smallbutton" href="{% course_url course_index course=Course.course_id %}">Goto</a></td>
        </tr>
    {% endfor %}
    {% else %}
    <p>No courses have been created yet</p>
    {% endif %}
</table>
